package com.gs.common.tool.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import lombok.experimental.FieldNameConstants;

import java.util.List;

/**
 * 注解信息
 * @author: guos
 * @date: 2025/03/12 20:30
 **/
@Data
@FieldNameConstants
@Accessors(chain = true)
@AllArgsConstructor
@NoArgsConstructor
public class AnnotationInfo {

    /**
     * 名称
     */
    private String name;

    /**
     * 属性列表
     */
    private List<Field> fieldList;


    @Data
    @FieldNameConstants
    @Accessors(chain = true)
    @AllArgsConstructor
    @NoArgsConstructor
    public static class Field {

        /**
         * 名称
         */
        private String name;

        /**
         * 值
         */
        private String value;

        /**
         * 是否需要引号
         */
        private Boolean haveQuot = false;


        public Field(String name) {
            this.name = name;
        }

        public Field(String name, String value) {
            this.name = name;
            this.value = value;
        }
    }
}
